<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<!-- HTML file produced from file: manual.tex --
 -- using Hyperlatex v 2.3.1 (c) Otfried Cheong--
 -- on Emacs 21.4 (patch 15) "Security Through Obscurity" XEmacs Lucid, Fri Dec  3 20:36:14 2004 -->
<HEAD>
<TITLE>Scheme 48 Manual -- Building images</TITLE>

</HEAD><BODY BGCOLOR="#ffffff">
<EM>Scheme 48 Manual</EM> | <A HREF="s48manual.html#top_node">Contents</A> | In Chapter: <A HREF="s48manual_11.html">Command processor</A><BR>Previous: <A HREF="s48manual_19.html">Command programs</A> | Next: <A HREF="s48manual_21.html">Resource query and control</A>
<H2>Building images</H2>
<P><DL><DT><B></B><DD><CODE>,dump <CODE><I>filename</I></CODE> [<CODE><I>identification</I></CODE>]</CODE><BR>Writes the current heap out to a file, which can then be run using the
    virtual machine.  The new image file includes the command processor.
    If present, <CODE><I>identification</I></CODE>
    should be a string (written with double quotes); this string will
    be part of the greeting message as the image starts up.
<P><DT><B></B><DD><CODE>,build <CODE><I>exp</I></CODE> <CODE><I>filename</I></CODE></CODE><BR>Like <CODE>,dump</CODE>, except that the image file contains the value of
    <CODE><I>exp</I></CODE>, which should be a procedure of one argument, instead of
    the command processor.  When
    <CODE><I>filename</I></CODE> is resumed, that procedure will be invoked on the VM's
    <CODE>-a</CODE> arguments, which are passed as a list of strings.  The
    procedure should return an integer which is
    returned to the program that invoked the VM.  The command
    processor and debugging system are not included in the image
    (unless you go to some effort to preserve them, such as retaining
    a continuation).
<P>    Doing <CODE>,flush</CODE> before building an image will reduce the amount
    of debugging information in the image, making for a smaller
    image file, but if an error occurs, the error message may be less
    helpful.  Doing <CODE>,flush source maps</CODE> before loading any programs
    used in the image will make it still smaller.
    See <A HREF="s48manual_21.html">the description of <CODE>flush</CODE></A>
    for more information.
<P></DL>
<P><P>
  
Previous: <A HREF="s48manual_19.html">Command programs</A> | Next: <A HREF="s48manual_21.html">Resource query and control</A></BODY></HTML>
